$intSeconds = Time.Cmp
("<time1>", "<time2>")
Calculates the number of seconds between 2 instances of time.
Parameters
<time1> The first time instance.
<time2> The second time instance.
Return Value
Returns
- 0, if both the instances are equal.
- Negative integer, if time1 > time2.
- Positive integer, if time1 < time2.
- An <Empty string> "" in case of error and sets $error.
Remarks
- Similar to DateDiff function in VB Script.
Example
$stime = "10:42:23"
$etime = "11:42:23"
$ret = time.Cmp($stime, $etime)
$stat = time.Cmp($etime, $stime)
- $ret contains 3600 and $stat contains -3600.